import { COMPONENT_TYPE } from '../../../../../libs/constants'

export default [
  {
    id: '1',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'groupCode',
      rules: [
        { required: true, message: '请输入列组编码', trigger: 'blur' },
        { min: 2, message: '列组编码最小长度为2个字符', trigger: 'blur' }
      ],
      label: '列组编码',
      extra: '列组编码，用于标识当前列组',
    },
    attrs: {
      value: 'key_' + Date.now(),
      type: 'text',
      allowClear: true,
      placeholder: '请输入列编码'
    }
  },
  {
    id: '2',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'title',
      rules: [
        { required: true, message: '请输入列组标题', trigger: 'blur' },
        { min: 2, message: '列组标题最小长度为2个字符', trigger: 'blur' }
      ],
      label: '列组标题',
      extra: '列组头显示文字',
    },
    attrs: {
      value: 'key_' + Date.now(),
      type: 'text',
      allowClear: true,
      placeholder: '请输入列组标题'
    }
  },
  {
    id:'3',
    type: COMPONENT_TYPE.RADIO_BUTTON,
    formItem: {
      prop: 'fixed',
      rules: [],
      label: '固定',
      extra: '列是否固定，可选 true(等效于 left) - | left | right',
    },
    attrs: {
      value: 'false',
      buttonStyle: 'solid',
      children: [
        {
          value: false,
          label: '-'
        },
        {
          value: 'left',
          label: 'left'
        },
        {
          value: 'right',
          label: 'right'
        }
      ]
    }
  }
]

